package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DishRecipeManagementMapper;
import com.ruoyi.system.domain.DishRecipeManagement;
import com.ruoyi.system.service.IDishRecipeManagementService;

/**
 * 商品做法管理 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-27
 */
@Service
public class DishRecipeManagementServiceImpl implements IDishRecipeManagementService
{
    @Autowired
    private DishRecipeManagementMapper dishRecipeManagementMapper;

    /**
     * 通过id查询商品做法管理
     *
     * @param id 商品做法管理主键
     * @return 商品做法管理
     */
    @Override
    public DishRecipeManagement selectDishRecipeManagementById(Long id)
    {
        return dishRecipeManagementMapper.selectDishRecipeManagementById(id);
    }

    /**
     * 通过做法名称查询商品做法管理列表
     *
     * @param recipeName  做法名称
     * @return 商品做法管理
     */
    @Override
    public List<DishRecipeManagement> selectDishRecipeManagementListByName(String recipeName)
    {
        return dishRecipeManagementMapper.selectDishRecipeManagementListByName(recipeName);
    }

    /**
     * 新增商品做法管理
     *
     * @param dishRecipeManagement 商品做法管理
     * @return 结果
     */
    @Override
    public int insertDishRecipeManagement(DishRecipeManagement dishRecipeManagement)
    {
        return dishRecipeManagementMapper.insertDishRecipeManagement(dishRecipeManagement);
    }

    /**
     * 修改商品做法管理
     *
     * @param dishRecipeManagement 商品做法管理
     * @return 结果
     */
    @Override
    public int updateDishRecipeManagement(DishRecipeManagement dishRecipeManagement)
    {
        return dishRecipeManagementMapper.updateDishRecipeManagement(dishRecipeManagement);
    }

    /**
     * 通过id批量删除商品做法管理信息
     *
     * @param ids 需要删除的商品做法管理主键
     * @return 结果
     */
    @Override
    public int deleteDishRecipeManagementByIds(Long[] ids)
    {
        return dishRecipeManagementMapper.deleteDishRecipeManagementByIds(ids);
    }

    /**
     * 通过id删除商品做法管理信息
     *
     * @param id 商品做法管理主键
     * @return 结果
     */
    @Override
    public int deleteDishRecipeManagementById(Long id)
    {
        return dishRecipeManagementMapper.deleteDishRecipeManagementById(id);
    }
}
